#ifndef __ENVELEMENT__
#define __ENVELEMENT__

#include <vector>
#include <allegro5/allegro_primitives.h>
#include "Graphics.h"

using namespace std;

struct Box
{
	int x1;
	int x2;
	int y1;
	int y2;
	int dmg;
};

struct Point
{
	int x;
	int y;
};

struct rgb_value
{
	int r;
	int g;
	int b;
};

class env_element
{
private:
	ALLEGRO_BITMAP * pic;
	
	int r;
	int g;
	int b;
	int absx, absy;
	int type;
	int sizex, sizey;
	vector<Box> Boxes;
	vector<Box> new_Boxes;
	vector<Point> Points;
	vector<rgb_value> rgb;
	Box Mainbox;
	Graphics ** GR;
public:
	env_element(Graphics ** graphics);
	void draw(ALLEGRO_DISPLAY ** display,int * scrollx, int * scolly);
	int * get_collision(Box b1,int x, int y, int xspeed, int yspeed, int direct);
	void create_new_env(int x);
	
	~env_element();
};


#endif